package com.dgw.utils;

import java.util.UUID;

import org.springframework.util.StringUtils;

public class StringUtil {
	
	public static String uuid(){
		return uuid(null);
	}
	
	public static String uuid(String prefix){
		String randomUUID = UUID.randomUUID().toString();
		String replaceAll = randomUUID.replaceAll("-", "");
		if(!StringUtils.isEmpty(prefix)){
			replaceAll=prefix+replaceAll;
		}
		return replaceAll;
	}
}
